Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UseEnumSetOf should rewrite EnumSet.noneOf from empty Set.of() #570

Conversation

BramliAK
Copy link
Contributor

@BramliAK BramliAK commented Oct 5, 2024

What's changed?

Rewriting with EnumSet.noneOf from empty Set.of() by UseEnumSetOf

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

@timtebeek timtebeek self-requested a review October 5, 2024 20:39
@timtebeek timtebeek linked an issue Oct 5, 2024 that may be closed by this pull request
@timtebeek timtebeek added bug Something isn't working enhancement New feature or request labels Oct 5, 2024
@timtebeek timtebeek changed the title Issue-490: Rewriting with EnumSet.noneOf from empty Set.of() by UseEnumSetOf UseEnumSetOf should rewrite EnumSet.noneOf from empty Set.of() Oct 5, 2024
Copy link
Contributor

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this on @BramliAK ! I've pushed up a small polishing commit to clarify that the noneOf and of cases are fully separate, reusing the components you already deduced we need for the new separate template. Great to see this additional case covered with minimal changes

github-actions[bot]

This comment was marked as outdated.

@timtebeek timtebeek merged commit fe412ee into openrewrite:main Oct 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Rewrite of empty Set.of() by UseEnumSetOf doesn't compile
2 participants